package com.atguigu.gulimall.gateway.controller;

import com.atguigu.common.utils.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RefreshScope
@RestController
@RequestMapping("gateway/gateway")
public class GatewayController {
    @Value("${gateway.user.name}")
    private String userName;
    /**
     * 列表
     */
    @RequestMapping("/test")
    public R test() {
        return R.ok().put("userName", userName);
    }
}
